package com.th.supcom.pds.impl.manager.impl;

import java.util.List;
import java.util.Map;

import net.carefx.fc.framework.db.manager.GetSequenceHelper;

import org.apache.ibatis.session.RowBounds;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.th.supcom.pds.domain.pojo.InpPhamDispenseDetail;
import com.th.supcom.pds.impl.dao.InpPhamDispenseDetailMapper;
import com.th.supcom.pds.impl.manager.InpPhamDispenseDetailManager;

/**
 * InpPhamDispenseDetail 管理接口实现.
 * 
 * 住院摆药明细表.
 */
public class InpPhamDispenseDetailManagerImpl implements InpPhamDispenseDetailManager
{
    public static final String TAB_INP_PHAM_DISPENSE_DETAIL = "INP_PHAM_DISPENSE_DETAIL";

    private InpPhamDispenseDetailMapper m_inpPhamDispenseDetailMapper;

    /** 序列生成器. */
    private GetSequenceHelper m_getSequenceHelper;

    /**
     * 默认的构造函数.
     */
    public InpPhamDispenseDetailManagerImpl ()
    {

    }

    /**
     * 获取InpPhamDispenseDetailMapper.
     * 
     * @return InpPhamDispenseDetailMapper.
     */
    public InpPhamDispenseDetailMapper getInpPhamDispenseDetailMapper ()
    {
        return m_inpPhamDispenseDetailMapper;
    }

    /**
     * 注入InpPhamDispenseDetailMapper.
     * 
     * @param inpPhamDispenseDetailMapper set inpPhamDispenseDetailMapper.
     */
    public void setInpPhamDispenseDetailMapper (InpPhamDispenseDetailMapper inpPhamDispenseDetailMapper)
    {
        m_inpPhamDispenseDetailMapper = inpPhamDispenseDetailMapper;
    }

    /**
     * 获取序列.
     * 
     * @return GetSequenceHelper
     */
    public GetSequenceHelper getGetSequenceHelper ()
    {
        return m_getSequenceHelper;
    }

    /**
     * 注入序列.
     * 
     * @param getSequenceHelper getSequenceHelper.
     */
    public void setGetSequenceHelper (GetSequenceHelper getSequenceHelper)
    {
        m_getSequenceHelper = getSequenceHelper;
    }

    @Override
    public void addInpPhamDispenseDetailList (List <InpPhamDispenseDetail> list)
    {
        for (InpPhamDispenseDetail inpPhamDispenseDetail : list)
        {
            inpPhamDispenseDetail.setInpPhamDispenseDetailId (getInpPhamDispenseDetailSeq ());
        }
        m_inpPhamDispenseDetailMapper.addInpPhamDispenseDetailList (list);
    }

    @Override
    public InpPhamDispenseDetail getInpPhamDispenseDetailByID (Long id)
    {
        return m_inpPhamDispenseDetailMapper.getInpPhamDispenseDetailByID (id);
    }

    @Override
    public Long getInpPhamDispenseDetailSeq ()
    {
        return m_getSequenceHelper.getNextSequenceId (TAB_INP_PHAM_DISPENSE_DETAIL);
    }

    @Override
    public List <InpPhamDispenseDetail> findInpPhamDispenseDetailListByExample (InpPhamDispenseDetail inpPhamDispenseDetail)
    {
        return m_inpPhamDispenseDetailMapper.findInpPhamDispenseDetailListByExample (inpPhamDispenseDetail);
    }

    @Override
    public int findInpPhamDispenseDetailCountByExample (InpPhamDispenseDetail inpPhamDispenseDetail)
    {
        return m_inpPhamDispenseDetailMapper.findInpPhamDispenseDetailCountByExample (inpPhamDispenseDetail);
    }

    @Override
    public List <InpPhamDispenseDetail> findInpPhamDispenseDetailListByMap (Map <String, Object> params)
    {
        return m_inpPhamDispenseDetailMapper.findInpPhamDispenseDetailListByMap (params);
    }

    @Override
    public List <InpPhamDispenseDetail> findInpPhamDispenseDetailPagingByMap (Map <String, Object> params, Integer offset, Integer limit)
    {
        return m_inpPhamDispenseDetailMapper.findInpPhamDispenseDetailPagingByMap (new RowBounds (offset, limit), params);
    }

    @Override
    public Integer findInpPhamDispenseDetailCountByMap (Map <String, Object> params)
    {
        return m_inpPhamDispenseDetailMapper.findInpPhamDispenseDetailCountByMap (params);
    }

    @Override
    public int modifyInpPhamDispenseDetail (InpPhamDispenseDetail inpPhamDispenseDetail)
    {
        return m_inpPhamDispenseDetailMapper.modifyInpPhamDispenseDetail (inpPhamDispenseDetail);
    }

    @Override
    public int modifyInpPhamDispenseDetailByExample (InpPhamDispenseDetail inpPhamDispenseDetail)
    {
        return m_inpPhamDispenseDetailMapper.modifyInpPhamDispenseDetailByExample (inpPhamDispenseDetail);
    }

    @Override
    public int removeInpPhamDispenseDetailByID (Long id)
    {
        return m_inpPhamDispenseDetailMapper.removeInpPhamDispenseDetailByID (id);
    }

    @Override
    public int removeInpPhamDispenseDetailByMap (Map <String, Object> params)
    {
        return m_inpPhamDispenseDetailMapper.removeInpPhamDispenseDetailByMap (params);
    }

    @Override
    public void addInpPhamDispenseDetail (InpPhamDispenseDetail inpPhamDispenseDetail)
    {
        inpPhamDispenseDetail.setInpPhamDispenseDetailId (getInpPhamDispenseDetailSeq ());
        m_inpPhamDispenseDetailMapper.addInpPhamDispenseDetail (inpPhamDispenseDetail);
    }

    @Override
    public List <InpPhamDispenseDetail> findDispenseDetailListByApplyDetailIdList (List <Long> list)
    {
        return m_inpPhamDispenseDetailMapper.findDispenseDetailListByApplyDetailIdList (list);
    }

    @Override
    public int modifyInpPhamDispenseDetailList (List <InpPhamDispenseDetail> list)
    {
        return m_inpPhamDispenseDetailMapper.modifyInpPhamDispenseDetailList (list);
    }
    @Override
    public List <InpPhamDispenseDetail> findInpPhamDispenseDetailListByCondition (InpPhamDispenseDetail inpPhamDispenseDetail)
    {
        return m_inpPhamDispenseDetailMapper.findInpPhamDispenseDetailListByCondition(inpPhamDispenseDetail);
         
    }
    public static final Logger s_logger = LoggerFactory.getLogger (InpPhamDispenseDetailManagerImpl.class);

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";

    @Override
    public List <InpPhamDispenseDetail> findInpPhamDispenseDetail (InpPhamDispenseDetail inpPhamDispenseDetail)
    {
        return m_inpPhamDispenseDetailMapper.findInpPhamDispenseDetail (inpPhamDispenseDetail);
         
    }

   

   
}